import request from "../request";
// 用户管理页面接口模块
const userApi = {
  //   登录
  userLogin(params) {
    return request({
      url: "/userLoginapi/userLogin",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 个人信息图片上传
  uploadImage(params) {
    return request({
      url: "/userapi/fileupLoad",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 获取用户数据
  getUserData(params) {
    return request({
      url: "/userapi/getUserData",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 获取用户数据
  getPersonInfo(params) {
    return request({
      url: "/userapi/getPersonInfo",
      method: "get",
      mock: false,
      data: params,
    });
  },
  // 新增用户
  addUser(params) {
    return request({
      url: "/userapi/addUser",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 修改用户
  updateUserData(params) {
    return request({
      url: "/userapi/updateUserData",
      method: "post",
      mock: false,
      data: params,
    });
  },
  //删除用户
  deleteUser(params) {
    return request({
      url: "userApi/deleteUser",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 批量删除用户
  batchDelUser(params) {
    return request({
      url: "/userapi/batchDelUser",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 更改用户状态或密码
  changeStatusOrPassword(params) {
    return request({
      url: "/userapi/changeStatusOrPassword",
      method: "get",
      mock: false,
      data: params,
    });
  },
};
export default userApi;
